import {request} from './request'

export function getDetail (goodsId) {
  return request({
    url: '/goods/selectGoodsById',
    params: {
      goodsId
    }
  })
}

export class Goods {
  constructor(itemInfo) {
    //商品的名字
    this.goods_name = itemInfo.goods_name
    //商品的原价
    this.original = itemInfo.original
    //商品现在的价格
    this.price = itemInfo.price
    //商品已售的数量
    this.is_sale = itemInfo.is_sale
  }
}
